package com.excilys.formation.projet.ebanking.webapp.controller;

import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("admin/")
public class AdminController {
	
	@RequestMapping("index.html")
	public String initAdmin(ModelMap model) {
		model.addAttribute("identifiant", SecurityContextHolder.getContext().getAuthentication().getName());
		return "admin";
	}
}
